"""
    图像的属性：
        形状：img.shape
        图像大小：img.size
        数据类型：img.dtype
"""
import numpy as np
import cv2 as cv
import matplotlib.pyplot as plt

img = np.zeros((256, 256, 3), np.uint8)

plt.imshow(img[:, :, ::-1])
# 获取某个像素点的值
px = img[100, 100]
# 仅获取蓝色通道的强度值
blue = img[100, 100, 0]
print(blue)
# 修改某个位置的像素值
img[100, 100] = (255, 255, 255)
plt.imshow(img[:, :, ::-1])
plt.show()

print(img.shape)
print(img.dtype)
print(img.size)

